package mxmf.entity.common;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;

import mxmf.content.ActionEnum;

@Embeddable
public class LinkEntity implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @Column(name = "OBJ_NAME", length = 128)
    private String name;

    @Column(name = "OBJ_TYPE", length = 32)
    private String type;

    @Column(name = "OBJ_CODE", length = 32)
    private String code;

    @Column(name = "OBJ_ID", length = 20)
    private Long id;

    @Transient
    @JsonIgnore
    private ActionEnum actionEnum;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public ActionEnum getActionEnum() {
        return actionEnum;
    }

    public void setActionEnum(ActionEnum actionEnum) {
        this.actionEnum = actionEnum;
    }

    @Override
    public String toString() {
        return "LinkEntity [name=" + name + ", type=" + type + ", code=" + code + ", id=" + id
                + "]";
    }
}
